
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.Workflow.Runtime;
using System.Threading;
using T2.WebSecurity.Business.Entities.Interfaces;
using T2.WebSecurity.Data.Entities.Interfaces;
using T2.WebSecurity.Data.Entities.Search.Interfaces;
using T2.WebSecurity.Data.Controllers.Interfaces;
using T2.WebSecurity.Data.Controllers;
using T2.WebSecurity.Business.Entities;
using T2.WebSecurity.Business.Entities.Search.Interfaces;
using T2.WebSecurity.Business.Workflow;
using T2.WebSecurity.Business.Directors.Interface;
using T2.WebSecurity.Business.Directors;
using T2.WebSecurity.Business;
using System.Activities;
//--Change Management Control - Business Service Class  --**********************
//--Created By: trooks
//--Description: Business Service Class
//--Created Date: 03/07/2013 10:47:12
//--*************************************************************

namespace T2.WebSecurity.Business
{
	public partial class BusinessService : IBusinessService
	{
	
		public String ValidationErrors { get; set; }
	    public IDictionary<string, int> UserProfileController_Set(IUserProfile_biz _param) 
		{
            //IDictionary<string, object> retVal = new Dictionary<string, object>();
            //Activity wf = null;
            //IDictionary<string, Object> myArgs = new Dictionary<string, Object>();
            //WorkflowHelper wh = new WorkflowHelper();
            //wf = new Customer_GetAllBuildings();
            //myArgs.Add("CustomerID", Convert.ToInt32(myCustomerId));
            //myArgs.Add("SendTo", "tracy.rooks@t-2s.net|dan@t-2s.com");
            //retVal = wh.ExecuteWorkflow(wf, myArgs);

			T2.WebSecurity.Business.Commands.UserProfile_Command cmd = new T2.WebSecurity.Business.Commands.UserProfile_Command();
			IDictionary<string,int> r = cmd.Execute(_param);
			
			return r;
		}

		public List<IUserProfile_biz> UserProfileController_Get(IUserProfile_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IUserProfile_director_biz cd = new UserProfile_Director_biz();
			List<IUserProfile_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public List<IUserProfile_biz> UserProfileController_Search(IUserProfileSearch_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IUserProfile_director_biz cd = new UserProfile_Director_biz();
			List<IUserProfile_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public IDictionary<string, int> MembershipController_Set(IMembership_biz _param) 
		{
			//WorkflowHelper<Workflow_Membership, IMembership_biz> wh =
				//new WorkflowHelper<Workflow_Membership, IMembership_biz>();
			//Int32 retVal = wh.Execute(_param);
			//return retVal;
			T2.WebSecurity.Business.Commands.Membership_Command cmd = new T2.WebSecurity.Business.Commands.Membership_Command();
			IDictionary<string,int> r = cmd.Execute(_param);
			//var ret = r.ToList().Select(s  => new {Key=s.Key, Value = s.Value}) ;
			//var retVal = ret.Where(z => z.Key == "Return_Value").Select(m => m.Value);
			//bool retBool = Convert.ToBoolean(retVal);
			return r;
		}

		public List<IMembership_biz> MembershipController_Get(IMembership_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IMembership_director_biz cd = new Membership_Director_biz();
			List<IMembership_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public List<IMembership_biz> MembershipController_Search(IMembershipSearch_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IMembership_director_biz cd = new Membership_Director_biz();
			List<IMembership_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public IDictionary<string, int> OAuthMembershipController_Set(IOAuthMembership_biz _param) 
		{
			//WorkflowHelper<Workflow_OAuthMembership, IOAuthMembership_biz> wh =
				//new WorkflowHelper<Workflow_OAuthMembership, IOAuthMembership_biz>();
			//Int32 retVal = wh.Execute(_param);
			//return retVal;
			T2.WebSecurity.Business.Commands.OAuthMembership_Command cmd = new T2.WebSecurity.Business.Commands.OAuthMembership_Command();
			IDictionary<string,int> r = cmd.Execute(_param);
			//var ret = r.ToList().Select(s  => new {Key=s.Key, Value = s.Value}) ;
			//var retVal = ret.Where(z => z.Key == "Return_Value").Select(m => m.Value);
			//bool retBool = Convert.ToBoolean(retVal);
			return r;
		}

		public List<IOAuthMembership_biz> OAuthMembershipController_Get(IOAuthMembership_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IOAuthMembership_director_biz cd = new OAuthMembership_Director_biz();
			List<IOAuthMembership_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public List<IOAuthMembership_biz> OAuthMembershipController_Search(IOAuthMembershipSearch_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IOAuthMembership_director_biz cd = new OAuthMembership_Director_biz();
			List<IOAuthMembership_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public IDictionary<string, int> ApplicationRolesController_Set(IApplicationRoles_biz _param) 
		{
			//WorkflowHelper<Workflow_ApplicationRoles, IApplicationRoles_biz> wh =
				//new WorkflowHelper<Workflow_ApplicationRoles, IApplicationRoles_biz>();
			//Int32 retVal = wh.Execute(_param);
			//return retVal;
			T2.WebSecurity.Business.Commands.ApplicationRoles_Command cmd = new T2.WebSecurity.Business.Commands.ApplicationRoles_Command();
			IDictionary<string,int> r = cmd.Execute(_param);
			//var ret = r.ToList().Select(s  => new {Key=s.Key, Value = s.Value}) ;
			//var retVal = ret.Where(z => z.Key == "Return_Value").Select(m => m.Value);
			//bool retBool = Convert.ToBoolean(retVal);
			return r;
		}

		public List<IApplicationRoles_biz> ApplicationRolesController_Get(IApplicationRoles_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IApplicationRoles_director_biz cd = new ApplicationRoles_Director_biz();
			List<IApplicationRoles_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public List<IApplicationRoles_biz> ApplicationRolesController_Search(IApplicationRolesSearch_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IApplicationRoles_director_biz cd = new ApplicationRoles_Director_biz();
			List<IApplicationRoles_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public IDictionary<string, int> UsersInRolesController_Set(IUsersInRoles_biz _param) 
		{
			//WorkflowHelper<Workflow_UsersInRoles, IUsersInRoles_biz> wh =
				//new WorkflowHelper<Workflow_UsersInRoles, IUsersInRoles_biz>();
			//Int32 retVal = wh.Execute(_param);
			//return retVal;
			T2.WebSecurity.Business.Commands.UsersInRoles_Command cmd = new T2.WebSecurity.Business.Commands.UsersInRoles_Command();
			IDictionary<string,int> r = cmd.Execute(_param);
			//var ret = r.ToList().Select(s  => new {Key=s.Key, Value = s.Value}) ;
			//var retVal = ret.Where(z => z.Key == "Return_Value").Select(m => m.Value);
			//bool retBool = Convert.ToBoolean(retVal);
			return r;
		}

		public List<IUsersInRoles_biz> UsersInRolesController_Get(IUsersInRoles_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IUsersInRoles_director_biz cd = new UsersInRoles_Director_biz();
			List<IUsersInRoles_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public List<IUsersInRoles_biz> UsersInRolesController_Search(IUsersInRolesSearch_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IUsersInRoles_director_biz cd = new UsersInRoles_Director_biz();
			List<IUsersInRoles_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public IDictionary<string, int> ApplicationController_Set(IApplication_biz _param) 
		{
			//WorkflowHelper<Workflow_Application, IApplication_biz> wh =
				//new WorkflowHelper<Workflow_Application, IApplication_biz>();
			//Int32 retVal = wh.Execute(_param);
			//return retVal;
			T2.WebSecurity.Business.Commands.Application_Command cmd = new T2.WebSecurity.Business.Commands.Application_Command();
			IDictionary<string,int> r = cmd.Execute(_param);
			//var ret = r.ToList().Select(s  => new {Key=s.Key, Value = s.Value}) ;
			//var retVal = ret.Where(z => z.Key == "Return_Value").Select(m => m.Value);
			//bool retBool = Convert.ToBoolean(retVal);
			return r;
		}

		public List<IApplication_biz> ApplicationController_Get(IApplication_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IApplication_director_biz cd = new Application_Director_biz();
			List<IApplication_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public List<IApplication_biz> ApplicationController_Search(IApplicationSearch_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IApplication_director_biz cd = new Application_Director_biz();
			List<IApplication_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public IDictionary<string, int> PasswordQuestionController_Set(IPasswordQuestion_biz _param) 
		{
			//WorkflowHelper<Workflow_PasswordQuestion, IPasswordQuestion_biz> wh =
				//new WorkflowHelper<Workflow_PasswordQuestion, IPasswordQuestion_biz>();
			//Int32 retVal = wh.Execute(_param);
			//return retVal;
			T2.WebSecurity.Business.Commands.PasswordQuestion_Command cmd = new T2.WebSecurity.Business.Commands.PasswordQuestion_Command();
			IDictionary<string,int> r = cmd.Execute(_param);
			//var ret = r.ToList().Select(s  => new {Key=s.Key, Value = s.Value}) ;
			//var retVal = ret.Where(z => z.Key == "Return_Value").Select(m => m.Value);
			//bool retBool = Convert.ToBoolean(retVal);
			return r;
		}

		public List<IPasswordQuestion_biz> PasswordQuestionController_Get(IPasswordQuestion_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IPasswordQuestion_director_biz cd = new PasswordQuestion_Director_biz();
			List<IPasswordQuestion_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public List<IPasswordQuestion_biz> PasswordQuestionController_Search(IPasswordQuestionSearch_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IPasswordQuestion_director_biz cd = new PasswordQuestion_Director_biz();
			List<IPasswordQuestion_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public IDictionary<string, int> UserProfileDataController_Set(IUserProfileData_biz _param) 
		{
			//WorkflowHelper<Workflow_UserProfileData, IUserProfileData_biz> wh =
				//new WorkflowHelper<Workflow_UserProfileData, IUserProfileData_biz>();
			//Int32 retVal = wh.Execute(_param);
			//return retVal;
			T2.WebSecurity.Business.Commands.UserProfileData_Command cmd = new T2.WebSecurity.Business.Commands.UserProfileData_Command();
			IDictionary<string,int> r = cmd.Execute(_param);
			//var ret = r.ToList().Select(s  => new {Key=s.Key, Value = s.Value}) ;
			//var retVal = ret.Where(z => z.Key == "Return_Value").Select(m => m.Value);
			//bool retBool = Convert.ToBoolean(retVal);
			return r;
		}

		public List<IUserProfileData_biz> UserProfileDataController_Get(IUserProfileData_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IUserProfileData_director_biz cd = new UserProfileData_Director_biz();
			List<IUserProfileData_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public List<IUserProfileData_biz> UserProfileDataController_Search(IUserProfileDataSearch_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IUserProfileData_director_biz cd = new UserProfileData_Director_biz();
			List<IUserProfileData_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public IDictionary<string, int> ApplicationUserController_Set(IApplicationUser_biz _param) 
		{
			//WorkflowHelper<Workflow_ApplicationUser, IApplicationUser_biz> wh =
				//new WorkflowHelper<Workflow_ApplicationUser, IApplicationUser_biz>();
			//Int32 retVal = wh.Execute(_param);
			//return retVal;
			T2.WebSecurity.Business.Commands.ApplicationUser_Command cmd = new T2.WebSecurity.Business.Commands.ApplicationUser_Command();
			IDictionary<string,int> r = cmd.Execute(_param);
			//var ret = r.ToList().Select(s  => new {Key=s.Key, Value = s.Value}) ;
			//var retVal = ret.Where(z => z.Key == "Return_Value").Select(m => m.Value);
			//bool retBool = Convert.ToBoolean(retVal);
			return r;
		}

		public List<IApplicationUser_biz> ApplicationUserController_Get(IApplicationUser_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IApplicationUser_director_biz cd = new ApplicationUser_Director_biz();
			List<IApplicationUser_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public List<IApplicationUser_biz> ApplicationUserController_Search(IApplicationUserSearch_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IApplicationUser_director_biz cd = new ApplicationUser_Director_biz();
			List<IApplicationUser_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public IDictionary<string, int> ApplicationProfileDataController_Set(IApplicationProfileData_biz _param) 
		{
			//WorkflowHelper<Workflow_ApplicationProfileData, IApplicationProfileData_biz> wh =
				//new WorkflowHelper<Workflow_ApplicationProfileData, IApplicationProfileData_biz>();
			//Int32 retVal = wh.Execute(_param);
			//return retVal;
			T2.WebSecurity.Business.Commands.ApplicationProfileData_Command cmd = new T2.WebSecurity.Business.Commands.ApplicationProfileData_Command();
			IDictionary<string,int> r = cmd.Execute(_param);
			//var ret = r.ToList().Select(s  => new {Key=s.Key, Value = s.Value}) ;
			//var retVal = ret.Where(z => z.Key == "Return_Value").Select(m => m.Value);
			//bool retBool = Convert.ToBoolean(retVal);
			return r;
		}

		public List<IApplicationProfileData_biz> ApplicationProfileDataController_Get(IApplicationProfileData_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IApplicationProfileData_director_biz cd = new ApplicationProfileData_Director_biz();
			List<IApplicationProfileData_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public List<IApplicationProfileData_biz> ApplicationProfileDataController_Search(IApplicationProfileDataSearch_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IApplicationProfileData_director_biz cd = new ApplicationProfileData_Director_biz();
			List<IApplicationProfileData_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public IDictionary<string, int> DomainNameController_Set(IDomainName_biz _param) 
		{
			//WorkflowHelper<Workflow_DomainName, IDomainName_biz> wh =
				//new WorkflowHelper<Workflow_DomainName, IDomainName_biz>();
			//Int32 retVal = wh.Execute(_param);
			//return retVal;
			T2.WebSecurity.Business.Commands.DomainName_Command cmd = new T2.WebSecurity.Business.Commands.DomainName_Command();
			IDictionary<string,int> r = cmd.Execute(_param);
			//var ret = r.ToList().Select(s  => new {Key=s.Key, Value = s.Value}) ;
			//var retVal = ret.Where(z => z.Key == "Return_Value").Select(m => m.Value);
			//bool retBool = Convert.ToBoolean(retVal);
			return r;
		}

		public List<IDomainName_biz> DomainNameController_Get(IDomainName_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IDomainName_director_biz cd = new DomainName_Director_biz();
			List<IDomainName_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public List<IDomainName_biz> DomainNameController_Search(IDomainNameSearch_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IDomainName_director_biz cd = new DomainName_Director_biz();
			List<IDomainName_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

	}
}
